home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
network
/
bsd.000
/
bsd.ftpd.shadow.patch
Wrap
Text File
|
1996-06-30
|
2KB
|
75 lines
Only in .: bsd.ftpd.shadow.patch
diff -u ../bsd.ftpd/ftpd.c ./ftpd.c
--- ../bsd.ftpd/ftpd.c Sat Sep 9 03:56:51 1995
+++ ./ftpd.c Sun Jun 30 14:31:18 1996
@@ -85,17 +85,22 @@
#include <syslog.h>
#include <time.h>
#include <unistd.h>
+#include <shadow.h>
#include "pathnames.h"
#include "extern.h"
+#ifndef d_namlen
+#define d_namlen d_reclen
+#endif
+
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-static char version[] = "Version 6.00/Linux";
+static char version[] = "Version 6.00.Linux.shadow";
extern off_t restart_point;
extern char cbuf[];
@@ -220,7 +225,8 @@
char *cp, line[LINE_MAX];
FILE *fd;
- __progname = basename(argv[0]);
+/* __progname = basename(argv[0]); */
+ __progname = argv[0];
/*
* LOG_NDELAY sets up the logging connection immediately,
@@ -387,9 +393,11 @@
{
static struct passwd save;
struct passwd *p;
+ struct spwd *sp;
if ((p = getpwnam(name)) == NULL)
- return (p);
+ if ((sp = getspnam(name)) == NULL)
+ return (p);
if (save.pw_name) {
free(save.pw_name);
free(save.pw_passwd);
@@ -399,7 +407,7 @@
}
save = *p;
save.pw_name = sgetsave(p->pw_name);
- save.pw_passwd = sgetsave(p->pw_passwd);
+ save.pw_passwd = sgetsave(sp->sp_pwdp);
save.pw_gecos = sgetsave(p->pw_gecos);
save.pw_dir = sgetsave(p->pw_dir);
save.pw_shell = sgetsave(p->pw_shell);
diff -u ../bsd.ftpd/pathnames.h ./pathnames.h
--- ../bsd.ftpd/pathnames.h Sat Sep 9 03:09:25 1995
+++ ./pathnames.h Sun Jun 30 14:20:00 1996
@@ -38,7 +38,10 @@
#define _PATH_DEVNULL "/dev/null"
#define _PATH_BSHELL "/bin/sh"
#define _PATH_NOLOGIN "/etc/nologin"
+
+#ifndef _PATH_WTMP
#define _PATH_WTMP "/var/adm/wtmp"
+#endif
#define _PATH_FTPUSERS "/etc/ftpusers"
#define _PATH_FTPCHROOT "/etc/ftpchroot"